#ifndef MODULES_CMD_CMDSERVICE_H_
#define MODULES_CMD_CMDSERVICE_H_
#include "../core/IBean.h"

///返回类型 (*方法名) (参数);
typedef void (*DECODER_HANDLE)(std::string json);

class CmdWrap {
public:
	int m = -1;
	std::string body;AIGC_JSON_HELPER(m,body)
};


class CmdService: public IBean {
public:
 	static void registerHandle(CMD_KEY key, DECODER_HANDLE fun);
 	static void dispense(CMD_KEY key, const std::string& json);
 	static void decodeAndDispense(const String& text);
};

#endif /* MODULES_CMD_CMDSERVICE_H_ */
